package site.lanmushan.framework.authorization.strategy;

import site.lanmushan.framework.authorization.Authority;

import java.util.List;

/**
 * @author Administrator
 */
public interface ContextStorageStrategy {
    /**
     * 获取权限实例
     *
     * @param key
     * @return
     */
    public Authority getPermissionAuthorityByKey(String key);

    /**
     * 获取所有权限实例
     *
     * @return
     */
    public List<Authority> getAllPermissionAuthority();

    /**
     * 获取所有正则实例
     *
     * @return
     */
    public List<Authority> getMatcherPermissionAuthority();

    /**
     * @param authorities
     */
    public void savePermissionAuthority(List<Authority> authorities);

    /**
     * 移除
     *
     * @param
     */
    public void removePermissionAuthority(String key);

    public void clean();

}
